@echo off
REM PPH Production: Stop and delete all PM2 processes and kill PM2 daemon

setlocal
where pm2 >nul 2>nul
if errorlevel 1 (
  set PM2=npx pm2
) else (
  set PM2=pm2
)

%PM2% stop all
%PM2% delete all
%PM2% kill

echo All processes stopped.
exit /b 0

